
int** generate(int numRows, int* returnSize, int** returnColumnSizes) 
{
    int **a=(int**)malloc(sizeof(int*)*numRows);
    *returnSize = numRows;
    *returnColumnSizes = malloc(sizeof(int) * numRows);
    for(int i=0;i<numRows;i++)
    {
    a[i] = (int *) malloc(sizeof(int ) * (i + 1));
    (*returnColumnSizes)[i] = i + 1;
        a[i][0]=1;
        a[i][i]=1;
    for(int j=1;j<i;j++)
    {
     a[i][j]=a[i-1][j]+a[i-1][j-1];
    }
    }
    
return a;
}